﻿<%@ Page Title="Admin Console - Add Face" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AddFace.aspx.cs" Inherits="AdminConsole.AddFace" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <h1>Add Face</h1>
                    <br />
                    <label>User ID of Person</label> <br />
                    <input type="text" id="userId" /> <br /> <br />
                    <label>User Data</label> <br />
                    <input type="text" id="picdata" /> <br /> <br />
                    <label>Face ID</label> <br />
                    <input type="text" id="faceId" /> <br /><br />
                    <label>Obtain Face ID from Image</label> <br />
                    <input type="file" id="faceIdFile" name="faceIdFile" onchange="loadImageFile();" /> <br />
                    or <br />
                    <label>Obtain Face ID from Image URL</label> <br />
                    <input type="text" id="faceUrl" /> <br /> <br />
                    <button type="button" class="btn btn-primary btn-lg" onclick="submit();">Submit</button>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function () {
            getKeys();
        });

        function submit() {
            var userId = document.getElementById('userId').value;
            var faceId = document.getElementById('faceId').value
            var faceUrl = document.getElementById('faceUrl').value;
            if (faceId != "") {
                addFileFaceId(userId);
            }
            else {
                addUrlFaceId(userId);
            }
        }
    </script>
</asp:Content>
